package top.yehot.cmmu.core.models.vo;

import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 适用于前端key-value组件，如：select,checkbox等
 * 
 * @author lquan
 * @date 2022-9-24 23:20:30
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class JLabValVO implements Serializable {
	
	private static final long serialVersionUID = 1L;

	/**
	 * 标签
	 */
	private String label;
	
	/**
	 * 值
	 */
	private Object value;

	/**
	 * 根据label和value创建一个LabelValueVO
	 *
	 * @param label 标签
	 * @param value 值
	 * @return LabelValueVO
	 */
	public static JLabValVO of(String label, Object value) {
		return new JLabValVO(label, value);
	}
}
